package com.chenfei.ioc.di;

import com.chenfei.ioc.bean.FirstBean;

/**
 * @author chenfei
 * @description
 * @since 2018/3/22
 */
public class SortBean {
    private FirstBean firstBean1;
    private FirstBean firstBean2;

    public SortBean(FirstBean firstBean){
        System.out.println("构造器注入前 打印查看对象 firstBean1 "+ firstBean1);
        System.out.println("构造器注入前 打印查看对象 firstBean2 "+ firstBean2);
        this.firstBean1 = firstBean;
        System.out.println("构造器注入后 打印查看对象 firstBean1 "+ firstBean1);
        System.out.println("构造器注入后 打印查看对象 firstBean2 "+ firstBean2);
    }

    public void setFirstBean2(FirstBean firstBean){
        System.out.println("set方式注入前 打印查看对象 firstBean1 "+ firstBean1);
        System.out.println("set方式注入前 打印查看对象 firstBean2 "+ firstBean2);
        this.firstBean2 = firstBean;
        System.out.println("set方式注入后 打印查看对象 firstBean1 "+ firstBean1);
        System.out.println("set方式注入后 打印查看对象 firstBean2 "+ firstBean2);
    }

}
